<!DOCTYPE html>
<html  class="x-admin-sm"  xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <title>Layui</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" th:href="@{/lib/layui/css/layui.css}"  media="all">
    <!-- 注意：如果你直接复制所有代码到本地，上述css路径需要改成你本地的 -->
</head>
<body>

<button>按钮</button>
<input type="text" value="我是输入框内容">

<script src="http://code.jquery.com/jquery-3.1.1.min.js"/>
<script>
    $(function ()
        {
            $(".btn").on('click',function (){
                var aa = $(".inp").val()
                console.log(aa)
            }
            );
        }
    )
</script>

</body>
</html>